Creating Relationship between two tables in PostgreSQL